package com.stef.MMH.datatypes;

import java.io.Serializable;

import javax.jdo.annotations.PrimaryKey;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

import com.google.appengine.api.datastore.Key;


@Entity
public class User implements Serializable
{
	@Id
	@PrimaryKey
    private String email;
    private String userName;
    private String passwordHash;
    private String realName;
    @OneToOne
    private House myHouseKey;

	public House getMyHouseKey() {
		return myHouseKey;
	}

	public void setMyHouseKey(House myHouseKey) {
		this.myHouseKey = myHouseKey;
	}

	protected User() {}
    
    public User(String name, String email, String passwordHash, String realName)
    {
        this.userName = name;
        this.email = email;
        this.passwordHash = passwordHash;
        this.realName = realName;
    }

    public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPasswordHash() {
		return passwordHash;
	}

	public void setPasswordHash(String passwordHash) {
		this.passwordHash = passwordHash;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}
}
